/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.jiadakeji.ppm.modules.business.service;

import java.util.List;

import com.jiadakeji.ppm.modules.sys.utils.UserUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jiadakeji.ppm.common.persistence.Page;
import com.jiadakeji.ppm.common.service.CrudService;
import com.jiadakeji.ppm.modules.business.entity.Community;
import com.jiadakeji.ppm.modules.business.dao.CommunityDao;

/**
 * 小区Service
 * @author HHAOYU
 * @version 2019-07-08
 */
@Service
@Transactional(readOnly = true)
public class CommunityService extends CrudService<CommunityDao, Community> {

	@Override
	public Community get(String id) {
		return super.get(id);
	}
	
	@Override
	public List<Community> findList(Community community) {
		return super.findList(community);
	}
	
	@Override
	public Page<Community> findPage(Page<Community> page, Community community) {
		return super.findPage(page, community);
	}
	
	@Override
	@Transactional(readOnly = false)
	public void save(Community community) {
		super.save(community);
		UserUtils.removeCache(UserUtils.CACHE_COMMUNITY_LIST);
	}


	@Override
	@Transactional(readOnly = false)
	public void delete(Community community) {
		//TODO 删除其它关联表
		
		super.delete(community);
	}

}